Skip to content

[COMMUNITY] 커뮤니티 기능 추가#26

Closed
LimPark996 wants to merge 5 commits intoPETTY-HUB:mainfrom
LimPark996:main
Closed

[COMMUNITY] 커뮤니티 기능 추가#26
LimPark996 wants to merge 5 commits intoPETTY-HUB:mainfrom
LimPark996:main

Conversation

@LimPark996
Copy link
Contributor

📜 PR 내용 요약

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

커뮤니티(Community) 기능을 새롭게 추가했습니다.

static 리소스(static/js/common, static/images) 폴더를 추가하여 게시글 작성/수정 기능과 연동되는 자바스크립트 및 기본 이미지(유저가 이미지 업로드를 안했을때 보여지는 기본 이미지)를 관리하도록 구성했습니다.

⚒️ 작업 및 변경 내용(상세하게)

변경 내용, 업데이트 및 수정 사항을 자세하게 적어주세요

1. Community 기능 추가

/src/main/java/io/github/petty/community/ 패키지 생성 및 전체 기능 구현

주요 구성

controller

  • PostController : 게시글 작성, 조회, 수정, 삭제 처리

  • CommentController : 댓글 작성, 조회, 삭제 처리

  • PostImageUploadController : Supabase Storage를 이용한 이미지 업로드

  • PostViewController : 게시글 조회수 증가 처리

dto

  • 게시글(Post), 댓글(Comment), 이미지(PostImage) 관련 요청/응답 DTO 추가

entity

  • 게시글(Post), 댓글(Comment), 게시글 이미지(PostImage), 좋아요(PostLike) 엔티티 추가

repository

  • Post, Comment, PostImage, PostLike 각각에 대한 JPA Repository 생성

service

  • 게시글/댓글 CRUD, 이미지 업로드/삭제 등 비즈니스 로직 구현

util

  • SupabaseUploader : Supabase Storage 파일 업로드 지원

2. resources 폴더 변경

/src/main/resources/static/ 하위에 다음 폴더 및 파일 추가

static/images/no-images.jpg

이미지가 없는 게시글을 위한 기본 이미지 파일

static/js/common/

edit-qna.js, edit-review.js, edit-showoff.js, form.js 파일 추가

게시글 작성/수정 폼의 동작을 제어하는 JavaScript 파일

/src/main/resources/templates/ 하위에 다음 HTML 파일 추가

post-qna-form.html, post-qna-list.html

post-review-form.html, post-review-list.html

post-showoff-form.html, post-showoff-list.html

edit-qna.html, edit-review.html, edit-showoff.html

post-detail.html

기존 index.html 수정 (게시판 접근 버튼 추가)

📚 기타 참고 사항

리뷰 포인트, 참고 사항, 빌드 관련 내용 기타 사항을 자세히 적어주세요

  • Supabase Storage를 이용하여 게시글 이미지 업로드 기능이 동작하도록 구성되어 있습니다.
  • .env 혹은 application.yml 파일에 Supabase 관련 URL과 KEY 설정 필요
  • 게시글 유형(PostType), 반려동물 유형(PetType) 은 enum으로 관리합니다.
  • 아직 좋아요/댓글수/조회수 관련 최적화는 진행하지 않았습니다. (후속 작업 예정)
  • community 기능은 기본 CRUD 동작을 최우선으로 구현한 상태입니다. (추가 고도화 필요 가능성 있음)
  • 기존 기능과 충돌은 없습니다.

@coderabbitai
Copy link

coderabbitai bot commented Apr 26, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@LimPark996
Copy link
Contributor Author

05.21 기준 PETTY-HUB 에서 Community 폴더 및 관련 resources 추가하였습니다.

SupabaseDataSourceConfig.java에서 community 관련 주석 두개 해제하였습니다.

build.gradle에서 아래 설정 추가하였습니다.

configurations.all {
	exclude group: 'commons-logging', module: 'commons-logging'
}

jdbc와 jpa가 공존한다는 Info가 떠서 jdbc 관련 dependency 주석 처리하였습니다.

--자세한 Info--

2025-05-20T23:28:46.898+09:00  INFO 19508 --- [petty] [  restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface io.github.petty.community.repository.CommentRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
//implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'

@LimPark996 LimPark996 closed this by deleting the head repository May 22, 2025
@LimPark996 LimPark996 changed the title [CRUD] 커뮤니티 기능 추가 [COMM] 커뮤니티 기능 추가 Jun 1, 2025
@LimPark996 LimPark996 changed the title [COMM] 커뮤니티 기능 추가 [COMMUNITY] 커뮤니티 기능 추가 Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant